package pipe.reader.writer.thread;

import pipe.reader.writer.WriteData;

import java.io.PipedWriter;

public class ThreadWriter extends Thread {
    private WriteData writeData;
    private PipedWriter writer;
    public ThreadWriter(WriteData writeData,PipedWriter writer) {
        super();
        this.writeData = writeData;
        this.writer = writer;
    }
    @Override
    public void run() {
        writeData.writeMethod(this.writer);
    }
}
